extend ./layout/default

block main-content
  #profileForm
    h2 Sign in
    .breakline  
    p
      input.email(type="email" placeholder="注册的邮箱或用户名")
    p
      input.password(type="password" placeholder="密码")
    .error
    button#submitProfile(type="submit" style="background-color: #274;text-align: center;") submit
    
    
  script.
    $('#submitProfile').click(function(){
      var account = $('.email').val()
      var password = $('.password').val()
      $.post('/login',{account:account, password:password}, function(data){
        if(data.status === 'ok'){
          location.href = "/"
        }else{
          $(".error").html(data.status)
        }
      })
    })
